package com.tqjc.execute.work.controller;

import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;

/**
 * @projectName: BaotouSteel
 * @className: CraneWorkWebsocketController
 * @author: Patienyon
 * @description: TODO
 * @date: 2023/6/12 16:48
 */

@Controller
public class CraneWorkWebsocketController {

    @MessageMapping("/craneWork/send-message")
    @SendTo("/craneWork/topic/messages")
    public String handleMessage(String message) {
        return "Received: " + message;
    }
}
